Attribute VB_Name = "modParseData"
Option Explicit
Public Buf As New clsPacketBuffer
Public Function ParseData(ByVal RawData As String)
    Dim PacketID As String
    Dim Data As String
    Dim sData() As String
    
    PacketID = Asc(Mid$(RawData, 2, 1))
    Data = Mid$(RawData, 5)
    sData = Split(Data, Chr(0))
    
    Select Case PacketID
           Case &HA0
            Debug.Print sData(0) 'Received Information
            Select Case sData(0)
                   Case "Requesting AdminPassword"
                        Buf.InsertString UserInfo.AdminPassword
                        Buf.SendPacket Form1.sckClient, &H0
            End Select
            
           Case &HA1 'Received Request HomeChannel
            Buf.InsertString "Home Channel"
            Buf.SendPacket Form1.sckClient, &H1
            
           
           
           Case &HA3
            Debug.Print sData(0) 'Received Client Request
            Buf.InsertString "SEXP"
            Buf.SendPacket Form1.sckClient, &HA3
            
            
    End Select
    
End Function

